home *** CD-ROM | disk | FTP | other *** search
/ Netware Super Library / Netware Super Library.iso / file_mgt / ffg / go_bat / golha.bat < prev    next >
Encoding:
DOS Batch File  |  1994-12-10  |  1.8 KB  |  56 lines

  1. @echo off
  2. ::
  3. :: This is a good template for using FFG with program that accepts a file
  4. :: list for input.  Archiving programs such as PKZIP and LHA also accept
  5. :: such lists.
  6. ::
  7. :: Explanation of FFG paramters used below:
  8. ::
  9. ::  /fp    - use packed path output format e.g. C:\dir\file.nam
  10. ::  /qfm   - quiet: suppress all output but spinning meter and found files
  11. ::  /p0    - ensure no pauses for each screen page (may be set in envirnment)
  12. ::  > LHA.LST - puts all output in a file LHA.LST which pE will use.
  13. ::
  14. if %2.==. goto USAGE
  15.   echo Searching for files to archive...
  16.   ffg /fp /qfm /p0 > C:\LHA.LST %2 %3 %4 %5 %6 %7 %8 %9
  17.   if errorlevel 101 if not errorlevel 102 goto INT_FOUND
  18.   if errorlevel 100 if not errorlevel 101 goto INT_NONE
  19.   if errorlevel 1   if not errorlevel 2   goto FOUND
  20.   :: 1 = 1 or more found
  21.   :: 0 = none found
  22.   :: 10x = same as above but with search interrupted by user
  23.   goto NONE_FOUND
  24. :INT_NONE
  25.   echo.
  26.   echo WARNING!: Search interrupted by user, more files may exist.
  27.   pause
  28. :NONE_FOUND
  29.   echo.
  30.   echo No files found.
  31.   goto END
  32. :INT_FOUND
  33.   echo.
  34.   echo WARNING!: Search interrupted by user, more files may exist.
  35.   pause
  36. :FOUND
  37.   echo Preparing to archive files...
  38.   :: LHA now uses LHA.LST file created by FFG to load files into editor:
  39.   lha u /p /a /x %1 @c:\lha.lst
  40.   goto END
  41. :USAGE
  42.   echo.
  43.   echo %0:
  44.   echo.
  45.   echo Search for and then archive a file or group of files using FFG as the
  46.   echo search engine and LHA as the archiver.
  47.   echo.
  48.   echo USAGE: %0 ArchiveName FFGFileSpec [FFG Options]
  49.   echo.
  50.   echo   Commas cannot be used in FFGFileSpec use '/' instead as in example.
  51.   echo.
  52.   echo Example: %0 cde:*.[txt/doc] /$"some text to find" /d94 /s0-100k
  53.   echo.
  54. :END
  55.   if exist c:\LHA.LST del c:\LHA.LST
  56.